<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
<div id="app"></div>
</body>
<script src="https://unpkg.com/vue"></script>
<script>

    var data={
        a:1,
        random:Math.random()
    };
    var vm=new Vue({
        el:'#app',
        data:data
    });

    console.log(vm.a===data.a);

    vm.a=2;
    console.log(data.a);

    data.a=3;
    console.log(vm.a);

    console.log('vm.$data===data:',vm.$data===data);

    console.log('vm.$el:',vm.$el===document.getElementById('app'));


    setInterval(function(){
        data.random=Math.random();
    },1000);
    vm.$watch('random', function (newVal,oldVal) {
        console.log('watch(vm.random):',newVal,oldVal);
    });
</script>
</html>